<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>Kukbuk - Usuń kategorię</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css"
	href="../../../../css/bootstrap.min.css"
	th:href="@{/css/bootstrap.min.css}" />
<link rel="stylesheet" type="text/css" href="../../../../css/custom.css"
	th:href="@{/css/custom.css}" />
</head>

<body>
	<!-- TOP MENU -->
	<div th:substituteby="template :: top-menu"></div>
	<!-- /TOP MENU -->

	<!-- MAIN CONTAINER -->
	<div class="container">
		<div class="row">
			<div class="page-header">
				<h1>Usuwanie kategorii</h1>
			</div>
		</div>

		<!-- MESSAGE BOXES -->
		<div class="row" th:include="template :: message-boxes"></div>
		<!-- /MESSAGE BOXES -->

		<div class="row">
			<form class="form-horizontal" th:action="@{/admin/category/remove}"
				th:object="${form}" method="POST">
				<fieldset>
					<div class="control-group"
						th:classappend="${#fields.hasErrors('categoryId')}? 'error'">
						<label class="control-label" for="categoryId">Kategorie</label>
						<div class="controls">
							<select class="span5" id="categoryId" th:field="*{categoryId}">
								<option
									th:each="cat : ${beans.categoryService.allButRootCategoriesAsMap}"
									th:value="${cat.value}" th:text="${cat.key}">BRAK</option>
							</select> <span class="help-inline"
								th:if="${#fields.hasErrors('categoryId')}"
								th:errors="*{categoryId}">ERROR</span>
							<p class="help-block">Pamiętaj, że usunięcie kategorii
								oznacza także usunięcie wszystkich podkategorii z nią
								powiązanych oraz przepisów w tych kategoriach! Zastanów się
								zanim to zrobisz.</p>
						</div>
					</div>


					<div class="form-actions">
						<button class="btn btn-danger" type="submit">
							<i class="icon-remove icon-white"></i> Usuń
						</button>
					</div>
				</fieldset>
			</form>
		</div>
	</div>
	<!-- /MAIN CONTAINER -->

	<!-- ======================================================== -->
	<!-- Scripts at bottom of page means faster loading times. -->
	<!-- Latest jQuery -->
	<script type="text/javascript"
		src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
	<!-- Bootstrap -->
	<script type="text/javascript" src="../../../../js/bootstrap.min.js"
		th:src="@{/js/bootstrap.min.js}"></script>
</body>
</html>